<template>
	<view class="main">
		<view class="search">
			<view class="searchs">
				<u--input v-model="mobile" placeholder="请输入手机号" placeholderStyle="font-size:30rpx;color:#999"></u--input>
			</view>
			<view class="sbtn" @click="getList">查询</view>
		</view>

		<view class="cont">
			<view class="cont-head">使用记录</view>
			<view class="cont-item" v-for="(i,o) in list" :key="o">
				<view class="cont-item-i">姓名：<text>{{i.userName}}</text></view>
				<view class="cont-item-i">联系方式：<text>{{i.mobile || '-'}}</text></view>
				<view class="cont-item-i">使用时间：<text>{{i.inTime}} - {{i.outTime}}</text></view>
				<view class="cont-item-i">办理人：<text>{{i.handleUser || '-'}}</text></view>
				<view class="cont-item-i">
					预约餐厅：<text>{{i.diningTime || ''}}</text>
				</view>
				<view class="cont-item-i">价格：<text>{{i.price || '-'}}</text></view>
				<view class="cont-item-i">备注：<text>{{i.remark || '-'}}</text></view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				mobile: '',
			}
		},
		methods: {
			async getList() {
				if(!this.mobile){
					uni.$u.toast('请输入手机号')
					return;
				}
				let res = await this.$api.rvApplyRecordList({
					pageNo: 1,
					pageSize: 99999,
					mobile: this.mobile
				})
				this.list = res.result.records
			},
		}
	}
</script>

<style lang="scss" scoped>
	.search {
		margin: 30rpx 0;
		display: flex;
		align-items: center;
		justify-content: space-around;
		height: 50rpx;

		.searchs {
			width: 400rpx;
		}

		.sbtn {
			width: 120rpx;
			border-radius: 12rpx;
			text-align: center;
			height: 50rpx;
			line-height: 50rpx;
			background-color: #276aee;
			color: #fff;
			font-weight: bold;

		}
	}

	.cont {
		margin: 20rpx 0;
		background-color: #fff;
		border-radius: 12rpx;

		.cont-head {
			text-align: center;
			color: #333;
			font-weight: bold;
			font-size: 33rpx;
			margin: 20rpx 0;
			padding: 20rpx 0;
			border-bottom: 1px solid #ccc;
		}

		.cont-item {
			margin: 20rpx 0;
			padding: 20rpx;
			border-bottom: 1px dashed #ddd;

			.cont-item-i {
				margin: 10rpx 0;
				display: flex;
				align-items: center;
				color: #777;
				font-size: 30rpx;

				text {
					font-size: 33rpx;
					color: #333;
				}
			}
		}
	}
</style>